﻿@model Coticula.Web.Models.Problems

@{
    ViewBag.Title = Model.Name;
}

@{
    var pageMenu = new MvcHtmlString[] { Html.ActionLink("Submit", "Index", "Submit", new { id = Model.Id }, null), Html.ActionLink("Problems", "Index"), };

    if (Roles.IsUserInRole("Administrator"))
    {
        Array.Resize(ref pageMenu, pageMenu.Length + 2);
        pageMenu[pageMenu.Length - 2] = Html.ActionLink("Edit", "Edit", new { id = Model.Id });
        pageMenu[pageMenu.Length - 1] = Html.ActionLink("Delete", "Delete", new { id = Model.Id });
    }
    ViewBag.PageMenu = pageMenu;
}

<h2>@ViewBag.Title</h2>

<fieldset>
    <legend>Problem</legend>

    <div class="display-field">
        @Html.Raw(Model.Description)
    </div>
</fieldset>
